/*
 * @(#)InvocationFutureListeners.java $version 2010. 8. 11
 *
 * Copyright 2007-2010 NHN Corp. All rights Reserved. 
 * NHN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

package com.nhncorp.usf.core.invoker;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * The Class InvocationFutureListeners.
 * 
 * @author Web Platform Development Team
 */
public final class InvocationFutureListeners {
	private static final Logger LOG = Logger.getLogger(InvocationFutureListeners.class.getName());

	/**
	 * InvocationFutureListeners private constructor.
	 */
	private InvocationFutureListeners() {
	}

	/**
	 * Notify.
	 * 
	 * @param future the future
	 * @param listener the listener
	 */
	public static void notify(InvocationFuture future, InvocationFutureListener listener) {
		try {
			listener.invocationComplete(future);
		} catch (Throwable th) {
			if (LOG.isLoggable(Level.SEVERE)) {
				LOG.log(Level.SEVERE, "Throwable caught from an InvocationFutureListener", th);
			}
		}
	}
}
